package com.wmm.fast.main.shop2Prototype;

/**
 * 原型模式,场景: 基于一个相同的对象原型修改,使用clone方式,优化重复代码以及减少错误概率
 * @Auther: Token360
 * @Date: 2018/9/6 17:22
 * @Description:
 */
public class PrototypeExecute {
    public static void main(String[] args) throws CloneNotSupportedException {
        Resume resume1 = new Resume();
        resume1.setName("张三");
        resume1.setAge(30);
        resume1.setGander("男");
        resume1.setType("Java");

        Resume resume2 = (Resume) resume1.clone();
        System.out.println(resume2.toString());

    }
}
